Cluster::Cluster

Section: ET++ method description (n)
Updated: automatically Thu Mar 21 20:11:29 1991
Index Return to Main Contents
 

NAME

Cluster::Cluster - instance method  

TEMPLATE

void Cluster(int id, VObjAlign align, Point gap, VObject * firstVObject, ellipsis ...)  

SPECIFIERS

public  

DESCRIPTION

This constructor is usually used when a complete VObject tree is created with a single statement.


For example:

VObject *layout =
        new Cluster (cIdNone, eVObjHLeft, gPoint8,
                new BorderItem ("TextItems",
                        new Cluster (cIdNone, eVObjVBase, gPoint4,
                                new TextItem ("item1"),
                                new TextItem ("item1"),
                                NULL        // end of list of 2nd Cluster
                        )
                ),
                new Scroller (aView),
                NULL        // end of list of 1st Cluster
        );

 

ARGUMENTS

int id

the id of this
VObjAlign align

see
instvar align
Point gap

see
instvar minGap
VObject * firstVObject

the first one of the VObjects to be arranged by this
ellipsis ...

a NULL
terminated list with the remaining VObjects to be arranged by this
 

RETURN ARGUMENT

void

 

CATEGORIES

client interface

 

FILES

implementation:
Cluster.C

 

NAME

Cluster::Cluster - instance method  

TEMPLATE

void Cluster(int id, VObjAlign align = eVObjVBase, Point gap = gPoint0, Collection * arrangedVObjects = NULL)  

SPECIFIERS

public  

DESCRIPTION

This constructor can be used if a collection of VObjects already exists or if the VObjects are added later.


For example:

Collection *items = new OrdCollection;
items->Add (new TextItem ("item1"));
items->Add (new TextItem ("item2"));
Cluster *cl = new Cluster (cIdNone, eVObjHLeft, gPoint8, items);

// Adding the VObjects later:

Cluster *cl = new Cluster (cIdNone, eVObjHLeft, gPoint8, NULL);
cl->Add (new TextItem ("item1"));
cl->Add (new TextItem ("item2"));

 

ARGUMENTS

int id

the id of this
VObjAlign align = eVObjVBase

see
instvar align
Point gap = gPoint0

see
instvar minGap
Collection * arrangedVObjects = NULL

the VObjects to be arranged by this
 

RETURN ARGUMENT

void

 

CATEGORIES

client interface

 

FILES

implementation:
Cluster.C

 

NAME

Cluster::Cluster - instance method  

TEMPLATE

void Cluster(int id, VObjAlign align, Point gap, va_list arrangedVObjects)  

SPECIFIERS

public  

DESCRIPTION

This constructor can be used if a function or method gets a variable number of VObject arguments.


For example:

// at least one non-VObject argument is required
// the macro "va_" hides machine dependencies

VObject *MyClass::DoMakeLayout (Point va_(gap), ...)
{
        va_list ap;
        va_start(ap, va_(gap));
        // "ap" now points to first VObject
        VObject *layout = new Cluster (cIdNone, eVObjHLeft, va_(gap), ap);
        va_end(ap);
        return layout; 
}

void MyClass::AnotherMethod()
{
        VObject *layout = DoMakeLayout (gPoint4,
                                        new TextItem("item1"),
                                        new TextItem("item2"),
                                        new TextItem("item3"),
                                        NULL);
}

 

ARGUMENTS

int id

the id of this
VObjAlign align

see
instvar align
Point gap

see
instvar minGap
va_list arrangedVObjects

refers to a NULL
terminated list with the VObjects to be arranged by this
 

RETURN ARGUMENT

void

 

CATEGORIES

client interface

 

FILES

implementation:
Cluster.C


 

Index

NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FILES
NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FILES
NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FILES

This document was created by man2html, using the manual pages.
Time: 00:40:31 GMT, March 30, 2022